Matthias Clasen [Mon, 22 Jun 2020 20:36:22 +0000 (16:36 -0400)]
Add a basic clipboard test
This is not reproducing the failure I'm after, unfortunately.
Matthias Clasen [Mon, 22 Jun 2020 18:13:25 +0000 (18:13 +0000)]
Merge branch 'keyval-to-uni-fix' into 'master'
gdk: Make gdk_keyval_to_unicode platform-independent
See merge request GNOME/gtk!2132
Matthias Clasen [Mon, 22 Jun 2020 17:56:43 +0000 (17:56 +0000)]
Merge branch 'fix-entry-completion' into 'master'
Fix entry completion
See merge request GNOME/gtk!2135
Matthias Clasen [Mon, 22 Jun 2020 17:24:34 +0000 (13:24 -0400)]
gdk: Clarify the docs of gdk_keyval_to_unicode
Explicitly state that the conversion does not
take locale into account, and point out GDK_KEY_KP_Decimal
as a candidate for special-casing.
Matthias Clasen [Mon, 22 Jun 2020 16:48:42 +0000 (12:48 -0400)]
entry completion: Make keynav work again
Use gtk_widget_prepend_controller to supersede entry keynav
while the popup is open. This fixes selecting completions
with the keyboard - the Enter keypress was ending up
triggering GtkText::activate instead of inserting the
selected completion into the entry.
Matthias Clasen [Mon, 22 Jun 2020 16:47:27 +0000 (12:47 -0400)]
Add gtk_widget_prepend_controller
Add a variant of gtk_widget_add_controller that
inserts the controller at the beginning, instead
of the end. This will be used in entry completion
to make sure the entry completion key event handling
supersedes the entry one while the popup is open.
Keep this private for now, until we determine if
it needs to be public api.
Matthias Clasen [Mon, 22 Jun 2020 16:46:12 +0000 (12:46 -0400)]
Fix change notification for event controllers
We were adding event controllers at the end, but
announcing a change at the beginning, in
gtk_widget_add_controller. Fix that by emitting
::items-changed for the position where we actually
inserted the controller.
Matthias Clasen [Mon, 22 Jun 2020 16:31:15 +0000 (12:31 -0400)]
entrycompletion: Name the controllers
This helps with debugging.
Matthias Clasen [Mon, 22 Jun 2020 15:47:27 +0000 (15:47 +0000)]
Merge branch 'wip/dont-assert-without-evidence' into 'master'
x11: be more verbose when glClientWaitSync behaves unexpectedtly
See merge request GNOME/gtk!2133
Ray Strode [Mon, 22 Jun 2020 15:07:32 +0000 (11:07 -0400)]
x11: be more verbose when glClientWaitSync behaves unexpectedtly
When given a 0 timeout, glClientWaitSync is only supposed to return one
of three possible values:
- GL_ALREADY_SIGNALED - fence fired
- GL_WAIT_FAILED - there was an error
- GL_TIMEOUT_EXPIRED - fence hasn't fired yet
In addition, it can also return GL_CONDITION_SATISFIED if a non-zero
timeout is passed, and the fence fires while waiting on the timeout.
Since commit
972134abe48a4c9c7b6ad41b0723f30f4e7ae16b we now call
glClientWaitSync (with a 0 timeout), but one user is reporting it's
returning some value that's not one of the above four.
This commit changes the g_assert to a g_error so we can see what
value is getting returned.
May help with https://gitlab.gnome.org/GNOME/gtk/-/issues/2858
Matthias Clasen [Mon, 22 Jun 2020 13:11:13 +0000 (13:11 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
gtk-demo: Add a warning to the colors demo
See merge request GNOME/gtk!2131
Matthias Clasen [Mon, 22 Jun 2020 12:31:10 +0000 (08:31 -0400)]
gdk: Make gdk_keyval_to_unicode platform-independent
The result of gdk_keyval_to_unicode should not depend
on the platform.
Timm Bäder [Mon, 22 Jun 2020 12:02:26 +0000 (12:02 +0000)]
Merge branch 'master.msvc' into 'master'
demos: Fix builds against Visual Studio headers
See merge request GNOME/gtk!2130
Matthias Clasen [Mon, 22 Jun 2020 11:43:47 +0000 (07:43 -0400)]
gtk-demo: Add a warning to the colors demo
Explain that the big sizes cause lockups.
Chun-wei Fan [Mon, 22 Jun 2020 09:04:18 +0000 (17:04 +0800)]
demos: Fix builds against Visual Studio headers
According to [1], '_timezone' is already used for a global variable in the
time.h system header that is supplied by Microsoft, so using that for our
variable name when we are including time.h either directly or indirectly
will cause trouble.
This renames such variables to '_tz' to avoid that
[1]: https://docs.microsoft.com/en-us/cpp/c-runtime-library/daylight-dstbias-timezone-and-tzname
Matthias Clasen [Mon, 22 Jun 2020 00:09:00 +0000 (00:09 +0000)]
Merge branch 'port-icon-browser' into 'master'
Port icon browser
See merge request GNOME/gtk!2127
Matthias Clasen [Sun, 21 Jun 2020 17:57:31 +0000 (17:57 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
filter: Make GtkEveryFilter buildable
See merge request GNOME/gtk!2125
Matthias Clasen [Mon, 8 Jun 2020 18:25:54 +0000 (14:25 -0400)]
Port the icon browser to GtkGridView
Matthias Clasen [Sun, 21 Jun 2020 17:07:08 +0000 (13:07 -0400)]
filter: Make GtkEveryFilter buildable
Due to an oversight, when multi filters were split into
any and every, any ended up with the listmodel and buildable
implementations, and every didn't get any.
Move the implementations up.
Matthias Clasen [Sun, 21 Jun 2020 12:49:49 +0000 (12:49 +0000)]
Merge branch 'wip/otte/listview-colors' into 'master'
Improve listview-colors demo
See merge request GNOME/gtk!2123
Matthias Clasen [Sun, 21 Jun 2020 05:06:58 +0000 (01:06 -0400)]
gtk-demo: Cosmetic improvement to the colors demo
Make the count label not jump around, as the model
is refilled.
Benjamin Otte [Sun, 21 Jun 2020 04:54:21 +0000 (06:54 +0200)]
gtk-demo: Add an "Unsorted" option (and default to it)
Tests the previous commit and ensures that selecting 16M colors actually
works quickly (it does).
Benjamin Otte [Sun, 21 Jun 2020 04:53:44 +0000 (06:53 +0200)]
sortlistmodel: Look at order
For now, we just look at SORT_ORDER_NONE to bypass any sorting.
Benjamin Otte [Sun, 21 Jun 2020 03:21:11 +0000 (05:21 +0200)]
gtk-demo: Reinstate incremental filling
Do it via the new size setting on the color list.
Also add an option to set the maximum size of the color list that it'll
be filled to so rudimentary performance testing is possible.
Hint: Do not select
16777216.
This reinstates commit
c16848c2bb683f7ddf51571aa5951f8a4a1ea622.
Benjamin Otte [Sun, 21 Jun 2020 02:44:52 +0000 (04:44 +0200)]
gtk-demo: Allow color list to have any size
For now, limit it to 1<<12 so the sorters don't explode.
Benjamin Otte [Sun, 21 Jun 2020 02:11:24 +0000 (04:11 +0200)]
gtk-demo: Add a permutation to compute colors from the position
This way, the colors are furthest apart at the start and fill up the
remaining spots towards the end.
Benjamin Otte [Fri, 19 Jun 2020 21:47:56 +0000 (23:47 +0200)]
gtk-demo: Add custom listmodel for all true colors.
Benjamin Otte [Fri, 19 Jun 2020 01:59:59 +0000 (03:59 +0200)]
gtk-demo: Make colors demo contain all 16,777,216 colors
This makes it slightly slow, so not sure it should stay like this.
Benjamin Otte [Tue, 16 Jun 2020 20:24:56 +0000 (22:24 +0200)]
gtk-demo: Compute HSV values directly
Benjamin Otte [Sun, 21 Jun 2020 01:56:53 +0000 (03:56 +0200)]
Revert "gtk-demo: Make the colors demo populate incrementally"
This eases adding a bunch of follow-up features. After those features
have landed, this functionality will be readded.
This reverts commit
a10340859df6aec405d9b6fc6e25c4790137af85.
Benjamin Otte [Tue, 16 Jun 2020 19:11:25 +0000 (21:11 +0200)]
gtk-demo: Embed the RGBA value
Aurimas Černius [Sun, 21 Jun 2020 11:47:05 +0000 (14:47 +0300)]
Updated Lithuanian translation
Piotr Drąg [Sun, 21 Jun 2020 09:37:46 +0000 (11:37 +0200)]
Update Polish translation
Matthias Clasen [Sun, 21 Jun 2020 05:58:15 +0000 (05:58 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
See merge request GNOME/gtk!2122
Matthias Clasen [Sun, 21 Jun 2020 05:20:05 +0000 (01:20 -0400)]
filechooserwidget: Use gtk_drop_down_get_selected_item
This showed up as a test failure when we get NULL as
selected item and then try to unref it. Luckily
get_selected_item is transfer none, so we don't have
to worry about it.
Benjamin Otte [Sun, 21 Jun 2020 00:14:53 +0000 (02:14 +0200)]
demo: Use GtkDropDown::selected-item
Benjamin Otte [Sun, 21 Jun 2020 00:17:47 +0000 (02:17 +0200)]
dropdown: emit notify for selected from the changed callback
Otherwise we don't emit it when the selection itself changes it - for
exaple because the model changed.
Matthias Clasen [Sat, 20 Jun 2020 21:21:29 +0000 (21:21 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
misc listview scrolling fixes
See merge request GNOME/gtk!2119
Matthias Clasen [Sat, 20 Jun 2020 20:35:23 +0000 (20:35 +0000)]
Merge branch 'incremental-colors' into 'master'
Incremental colors demo
See merge request GNOME/gtk!2121
Matthias Clasen [Sat, 20 Jun 2020 18:51:18 +0000 (18:51 +0000)]
Merge branch 'drop-down-selected-item' into 'master'
dropdown: Add GtkDropDown:selected-item
Closes #2861
See merge request GNOME/gtk!2120
Matthias Clasen [Sat, 20 Jun 2020 16:37:13 +0000 (12:37 -0400)]
gtk-demo: Make the colors demo populate incrementally
Add a refill button that incrementally refills the color
demo. This is useful to test how the grid view operates
when the model is frequently changed.
Matthias Clasen [Sat, 20 Jun 2020 12:48:29 +0000 (08:48 -0400)]
gtk-demo: Clean up initial selection handling
We call selection_cb now, so we don't need to manually
do part of what that call does ahead of time.
This should have been noticed in
10bcbae68c3faf8ae.
Matthias Clasen [Sat, 20 Jun 2020 17:12:52 +0000 (17:12 +0000)]
Merge branch 'gtk4-arb_fbo' into 'master'
Switch to GL_ARB_framebuffer_object
See merge request GNOME/gtk!2079
Matthias Clasen [Sat, 20 Jun 2020 17:11:48 +0000 (13:11 -0400)]
dropdown: Add GtkDropDown:selected-item
This is the same readonly property we have in
GtkSingleSelection.
Fixes: #2861
Matthias Clasen [Sat, 20 Jun 2020 16:18:17 +0000 (12:18 -0400)]
gtk-demo: Clean up memory handling in the weather demo
gtk_weather_info_new was consuming the info, but not
the timestamp, which confused me. Make it not consume
either, and be more explicit about where the unrefs
happen.
Matthias Clasen [Sat, 20 Jun 2020 16:11:59 +0000 (12:11 -0400)]
gridview: Don't assert on a condition that can happen
We are currently not robust against model changes or
widget invalidations, so we can actually end up in
situations where we run out of items here. Handle
the failure a bit more gracefully, by returning NULL.
This is good enough to make scrolling work okish most
of the time. We still need a proper fix to handle
other situations.
Benjamin Otte [Sat, 20 Jun 2020 16:08:46 +0000 (12:08 -0400)]
gridview: Compute right amount of items to skip
We only want to skip the remaining items in the current row, not since
the start of the widget.
Matthias Clasen [Sat, 20 Jun 2020 12:48:29 +0000 (08:48 -0400)]
gtk-demo: Clean up initial selection handling
We call selection_cb now, so we don't need to manually
do part of what that call does ahead of time.
This should have been noticed in
10bcbae68c3faf8ae.
Matthias Clasen [Fri, 19 Jun 2020 23:57:47 +0000 (23:57 +0000)]
Merge branch 'dnd-demo-animation' into 'master'
gtk-demo: Add animated icons to the dnd demo
See merge request GNOME/gtk!2117
Matthias Clasen [Fri, 19 Jun 2020 23:18:45 +0000 (19:18 -0400)]
gtk-demo: Add animated icons to the dnd demo
This is to test animated drag icons.
Matthias Clasen [Fri, 19 Jun 2020 22:24:36 +0000 (22:24 +0000)]
Merge branch 'listview-dnd' into 'master'
Listview dnd
See merge request GNOME/gtk!2116
Matthias Clasen [Fri, 19 Jun 2020 19:09:57 +0000 (15:09 -0400)]
testlistdnd: Use editable labels
Use editable labels instead of entries, and write
changes back to the model.
Matthias Clasen [Fri, 19 Jun 2020 19:24:24 +0000 (15:24 -0400)]
editablelabel: Allow to drag text
If we allow editing, we should allow direct drags too.
Matthias Clasen [Fri, 19 Jun 2020 19:08:43 +0000 (15:08 -0400)]
editablelabel: Accept text drops
This seems natural. If we allow editing, we should
allow drops too.
Matthias Clasen [Fri, 19 Jun 2020 16:37:39 +0000 (12:37 -0400)]
testlistdnd: Add a tree
This lets us test auto-expand of tree expanders.
Matthias Clasen [Fri, 19 Jun 2020 18:15:55 +0000 (14:15 -0400)]
expander: Remove a pointless return
GtkDropControllerMotion::enter does not expect
a boolean return value, so don't provide one.
Matthias Clasen [Fri, 19 Jun 2020 18:15:05 +0000 (14:15 -0400)]
treeexpander: Auto-expand during DND
When hovering over a tree expander during DND,
expand the tree after a timeout. This matches
the behavior of GtkTreeView and GtkExpander.
Matthias Clasen [Fri, 19 Jun 2020 12:51:32 +0000 (08:51 -0400)]
Add a list dnd example
Add a test for dnd with listview, gridview and columnview.
Matthias Clasen [Fri, 19 Jun 2020 16:23:28 +0000 (12:23 -0400)]
columnview: Increase the autoscroll threshold
With autoscroll during DND, we stop when you hit the edge
of the widget, so a larger threshold makes sense to avoid
hitting the edge by accident.
Matthias Clasen [Fri, 19 Jun 2020 16:22:25 +0000 (12:22 -0400)]
columnview: Autoscroll during DND
Use a drop motion controller to autoscroll horizontally
while a drag operation is hovering over the list. The
vertical scrolling is handled by the listview.
Matthias Clasen [Fri, 19 Jun 2020 15:54:12 +0000 (11:54 -0400)]
columnview: separate autoscroll from headers
Break out an update_autoscroll() function that can
be used for other things than header DND. It will
be used for autoscroll during DND in the future.
Matthias Clasen [Fri, 19 Jun 2020 13:58:31 +0000 (09:58 -0400)]
listbase: Don't use adjustments for autoscrolling
Don't consult the adjustments when determining
scroll deltas. It isn't necessary.
Matthias Clasen [Fri, 19 Jun 2020 12:19:34 +0000 (08:19 -0400)]
listbase: Increase the autoscroll threshold
With autoscroll during DND, we stop when you hit the edge
of the widget, so a larger threshold makes sense to avoid
hitting the edge by accident.
Matthias Clasen [Fri, 19 Jun 2020 12:18:54 +0000 (08:18 -0400)]
listbase: Autoscroll during DND
Use a drop motion controller to autoscroll while
a drag operation is hovering over the list.
Matthias Clasen [Fri, 19 Jun 2020 12:03:51 +0000 (08:03 -0400)]
listbase: separate autoscroll from rubberband
Break out an update_autoscroll() function that can
be used for other things than rubberbanding. It will
be used for autoscroll during DND in the future.
Matthias Clasen [Fri, 19 Jun 2020 16:17:27 +0000 (16:17 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2115
Matthias Clasen [Fri, 19 Jun 2020 15:40:54 +0000 (11:40 -0400)]
columview: Fix cell creation
We were getting lost in the columnview internal
structure here. The rows are children of the listview,
not of the columnview itself.
Matthias Clasen [Thu, 18 Jun 2020 11:48:56 +0000 (07:48 -0400)]
gtk-demo: Modernize the tag entry demo
Use a layout manager, and reduce boilerplate.
Matthias Clasen [Thu, 18 Jun 2020 03:42:21 +0000 (23:42 -0400)]
Revert "notebook: Don't capture clicks"
This reverts commit
37eb0496b60f3612f15fd9d0fb43a3e3f2ecc144.
This change broke notebook scroll arrows.
Benjamin Otte [Fri, 19 Jun 2020 15:20:32 +0000 (15:20 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
listbase: Fix copy/paste error
See merge request GNOME/gtk!2114
Benjamin Otte [Fri, 19 Jun 2020 13:50:10 +0000 (15:50 +0200)]
listbase: Fix copy/paste error
This could lead to "flickering" scroll behavior when scrolling
horizontally.
Florentina Mușat [Fri, 19 Jun 2020 06:17:36 +0000 (06:17 +0000)]
Update Romanian translation
Timm Bäder [Fri, 19 Jun 2020 03:58:09 +0000 (05:58 +0200)]
stack: Avoid using an uninitialized value
This was showing up as criticals since for_size != >= -1.
Timm Bäder [Thu, 18 Jun 2020 05:55:22 +0000 (07:55 +0200)]
stack: Add missing accessors for GtkStackPage properties
Timm Bäder [Mon, 15 Jun 2020 08:30:40 +0000 (10:30 +0200)]
stack: Fix some documentation mishaps
Timm Bäder [Sat, 13 Jun 2020 19:25:21 +0000 (21:25 +0200)]
stack: Fix :needs-attention docs
This is a property on GtkStackPage these days.
Timm Bäder [Sat, 13 Jun 2020 18:40:40 +0000 (20:40 +0200)]
widget: Don't leak css transform
Timm Bäder [Sat, 13 Jun 2020 06:39:19 +0000 (08:39 +0200)]
treeview: Remove identical if branches
Fixes #2725
Timm Bäder [Sat, 13 Jun 2020 06:25:51 +0000 (08:25 +0200)]
transform: Fix docs to use "transform" instead of "matrix"
Timm Bäder [Fri, 12 Jun 2020 19:40:34 +0000 (21:40 +0200)]
stack: stop keeping a cached child render node around
All widgets cache their render node already. Just allocate the
last_visible_child always at 0/0 and then move its rendernode around
during snapshot.
Fixes #2678
Timm Bäder [Fri, 12 Jun 2020 06:42:15 +0000 (08:42 +0200)]
cssselector: Only copy max_selector once
Timm Bäder [Fri, 12 Jun 2020 04:24:32 +0000 (06:24 +0200)]
numbervalue: Remove some leftover debugging code
Timm Bäder [Thu, 11 Jun 2020 13:30:34 +0000 (15:30 +0200)]
builder: Use default size of 8 for the ObjectProperty arrays
Timm Bäder [Thu, 11 Jun 2020 13:07:21 +0000 (15:07 +0200)]
builder: Avoid allocating things we don't use
We pretty often have no parameters at all, so avoid allocating
ObjectProperties+GArray+GPtrArray in that case.
Timm Bäder [Sun, 7 Jun 2020 11:11:33 +0000 (13:11 +0200)]
Avoid calling g_list_model_get_n_items() all the time
These are used in hot paths, e.g. widget construction.
Timm Bäder [Sun, 7 Jun 2020 07:37:20 +0000 (09:37 +0200)]
transform: Fix equal() docs
This has nothing to do with matrices.
Timm Bäder [Sun, 7 Jun 2020 07:36:56 +0000 (09:36 +0200)]
window: Add automatic titlebar before content widget
Just like we do with explicitly set titlebars
Timm Bäder [Sun, 7 Jun 2020 06:45:35 +0000 (08:45 +0200)]
transform: Compare 3d points directly
Timm Bäder [Sun, 7 Jun 2020 06:23:06 +0000 (08:23 +0200)]
window: Don't add class to css node directly
Use gtk_widget_add_css_class instead
Timm Bäder [Sun, 7 Jun 2020 06:22:09 +0000 (08:22 +0200)]
window: Stop adding css nodes manually
No decoration node, no need to do this.
Timm Bäder [Sun, 7 Jun 2020 06:19:14 +0000 (08:19 +0200)]
window: Remove dead code
There is no decoration node anymore.
Timm Bäder [Sat, 6 Jun 2020 13:38:53 +0000 (15:38 +0200)]
adwaita: Use proper transform for spinners
Timm Bäder [Sat, 6 Jun 2020 13:22:08 +0000 (15:22 +0200)]
widget: don't queue a redraw on css transform changes
Timm Bäder [Sat, 6 Jun 2020 13:13:23 +0000 (15:13 +0200)]
csstransformvalue: Make no-transform case explicit
Timm Bäder [Sat, 6 Jun 2020 10:22:46 +0000 (12:22 +0200)]
widget: Re-shuffle preconditions in snapshot_child()
The GtkNative type check is more expensive than the mapped one, so avoid
the former for unmapped widgets
Timm Bäder [Sat, 6 Jun 2020 10:09:10 +0000 (12:09 +0200)]
widget: Avoid doing GtkSnapshot work just to append one node
We already know that a widget will have literally 1 node, not more.
Avoid doing the GtkSnapshot state stack dance and just append a new
transform node instead.
Seems to give me around 400 more icons in the fishbowl
Timm Bäder [Sat, 6 Jun 2020 07:05:49 +0000 (09:05 +0200)]
gsktransform: Make next == NULL case explicit
This is handled with the is_identity() check as well but this way it's
much more obvious what's happening
Timm Bäder [Sat, 6 Jun 2020 06:31:35 +0000 (08:31 +0200)]
fishbowl: Remove visibility handling
First, almost all widgets are either visible and mapped, or visible and
unmapped because they are !child_visible. In both cases, we do care
about the size. If they are indeed invisible, gtk_widget_measure() will
take care of that by returning all 0.
And gtk_widget_unparent() already queues a resize on the parent if
necessary, so that is unneeded as well.
Timm Bäder [Sat, 6 Jun 2020 06:13:00 +0000 (08:13 +0200)]
Fix print dialog node name
Matthias Clasen [Fri, 19 Jun 2020 00:09:03 +0000 (00:09 +0000)]
Merge branch 'better-naming' into 'master'
Stop using loaded terms
See merge request GNOME/gtk!2109